<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<style type="text/css">

body{ background:#EEEEEE;margin:0; padding:0; font-family:"微软雅黑", Arial, Helvetica, sans-serif; }

a{ color:#006600; text-decoration:none;}

a:hover{color:#990000;}

.top{ margin:5px auto; color:#990000; text-align:center;}

.info select{ border:1px #993300 solid; background:#FFFFFF;}

.info{ margin:5px; text-align:center;}

.info #show{ color:#3399FF; }

.bottom{ text-align:right; font-size:12px; color:#CCCCCC; width:1000px;}

</style>

</head>

<body>
<link rel="stylesheet" href="__PUBLIC__/css/pintuer.css">
<link rel="stylesheet" href="__PUBLIC__/css/admin.css">
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/pintuer.js"></script>
</head>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a class="button border-main icon-plus-square-o" href="__MODULE__/News/add.html"> 添加内容</a> </li>
        <li>搜索：</li>
        <li>
          <select id="s_province" name="s_province" class="input" onchange="changesearch()" style="width:100px; line-height:17px; display:inline-block"> 
          </select>
         
          <select id="s_city" name="s_city"  class="input" onchange="changesearch()"  style="width:100px; line-height:17px;display:inline-block">
          </select>
         
          <select id="s_county" name="s_county" class="input" onchange="changesearch()"  style="width:100px; line-height:17px;display:inline-block">
          </select>
        </li>
        <script class="resources library" src="__PUBLIC__/area.js" type="text/javascript"></script>

    

    <script type="text/javascript">_init_area();</script>
     <div id="show"></div>
    <script type="text/javascript">

        var Gid  = document.getElementById ;

        var showArea = function(){

          Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" +  

          Gid('s_city').value + " - 县/区" + 

          Gid('s_county').value + "</h3>"

                      }

        Gid('s_county').setAttribute('onchange','showArea()');

    </script>
         
        <li>
          <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" />
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="100" style="text-align:left; padding-left:20px;">ID</th>
        <th>标题</th>
        <th>分类</th>
        <th>图片</th>
        <th>评论数</th>
        <th>浏览数</th>
        <th>收藏数</th>
        <th>操作员</th>
        <th width="10%">添加时间</th>
        <th width="210">操作</th>
      </tr>
      <volist name="list" id="vo">
      <foreach name="arr" item="v">
        <tr>
          <td style="text-align:left; padding-left:20px; ">
           {$v.id}</td>
          <td>{$v.lname}</td>
          <td>{$v.bid}</td>
          <td width="10%"><img src="__PUBLIC__/images/{$v.imagename}" alt="" width="70" height="50" /></td>
          <td>{$v.pinglun}</td>
          <td>{$v.viewtime}</td>
          <td>{$v.shoucang}</td>
          <td>{$v.operator}</td>
          <td><?php echo date("Y-m-d H:i:s",$v["addtime"])?></td>
         <td><div class="button-group">
           <?php if($_SESSION['status']==1){?>
           <a class="button border-main" href="<?=U("Baike/update",array('id'=>$v['id']));?>"><span class="icon-edit"></span> 修改</a>
           <a class="button border-red" href="javascript:void(0)" onclick="del(<?php echo $v['id']?>)"><span class="icon-trash-o"></span>删除</a>

           <?php }else{ ?>
          你无权操作
           <?php }?>
         </div></td>

        </tr>
        </foreach>
       <td colspan="11"><div class="pagelist"> {$pageStr} </div></td>
    </table>
  </div>
</form>
<script type="text/javascript">

//搜索
function changesearch(){	
		
}

//单个删除
function del(id){
	var title = window.confirm('您确定要删除此条数据么？')
	if(title){
		$.ajax({
			type:'post',
			url:'__CONTROLLER__/del',
			data:{id:id},
			dataType:"json",
			success:function(data){
				if(data.msg==1){
                alert("删除成功")
                window.location.reload();
                }
			}
		})
	}else{

	}
}


</script>
</body>
</html>